import request from '@/utils/request'

export function listDrug(query) {
  return request({
    url: '/drug/list',
    method: 'get',
    params: query
  })
}

export function createDrug(data) {
  return request({
    url: '/drug/create',
    method: 'post',
    data
  })
}

export function readDrug(query) {
  return request({
    url: '/drug/read',
    method: 'get',
    params: query
  })
}

export function updateDrug(data) {
  return request({
    url: '/drug/update',
    method: 'post',
    data
  })
}

export function deleteDrug(data) {
  return request({
    url: '/drug/delete',
    method: 'post',
    data
  })
}
